Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
The untildify npm package is used to convert a tilde path to an absolute path. It expands the tilde (~) in file paths to the user's home directory, which is particularly useful in Node.js applications where file paths are often specified in configuration files or command line arguments.
Path Expansion
This feature allows the expansion of the tilde (~) symbol to the user's home directory in a file path. It's useful for scripts and applications that need to access user-specific directories without hardcoding absolute paths.
const untildify = require('untildify');
console.log(untildify('~/Desktop')); // Outputs absolute path to the Desktop directory
Similar to untildify, os-homedir is used to get the home directory of the current user. However, it does not convert paths but only provides the home directory path. Untildify builds on this by converting a tilde-based path to an absolute path.
This package is similar to os-homedir but was more popular before Node.js v2.3.0, which included os.homedir() in its API. Like os-homedir, user-home retrieves the user's home directory but does not expand paths like untildify.
Convert a tilde path to an absolute path:
~/dev
=>/Users/sindresorhus/dev
$ npm install --save untildify
const untildify = require('untildify');
untildify('~/dev');
//=> '/Users/sindresorhus/dev'
See tildify for the inverse.
MIT © Sindre Sorhus
FAQs
Convert a tilde path to an absolute path: `~/dev` → `/Users/sindresorhus/dev`
The npm package untildify receives a total of 9,564,459 weekly downloads. As such, untildify popularity was classified as popular.
We found that untildify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.